from Crypto.Cipher import AES

def EnCodeByAESCBC(text, key, IV):
    aes = AES.new(key, AES.MODE_CBC, IV)
    text = aes.encrypt(text)
    return  text

def DeCodeByAESCBC(text, key, IV):
    aes = AES.new(key, AES.MODE_CBC, IV)
    text = aes.decrypt(text)
    return text

